<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<h1>Reservation</h1>

<div class="main">
    <div class="box_side search_hotel clearfix">
        <s:form action="list.dhtml">
            <ul>
                <li><label>Derby Hotel Code：</label>
                    <s:textfield name="condition.hotelPassport" cssClass="text"/>
                </li>
                <li><label>Ersp：</label>
                    <s:textfield name="condition.ersp" cssClass="text"/>
                </li>
                <li><label>Confirm No.：</label>
                    <s:textfield name="condition.confirmNumber" cssClass="text"/>
                </li>
                <li><label>State：</label>
                    <s:select name="condition.status" headerKey="" headerValue=""
                              list="@com.derbysoft.dswitch.adapter.ihg.common.domain.Status@values()"/>
                </li>
            </ul>
            <input type="submit" value="Search" class="common_button"/>
        </s:form>
    </div>
</div>
<div class="main">
    <jsp:include page="../../common/pagination.jsp"/>
    <table id="channel" class="table_list" cellpadding="0" cellspacing="0">
        <thead>
        <tr>
            <th>Ersp No</th>
            <th>Hotel Code</th>
            <th>ConfirmNo</th>
            <th>RtPlan</th>
            <th>RmType</th>
            <th>Adults</th>
            <th>Children</th>
            <th>NumOfUnit</th>
            <th>CheckIn</th>
            <th>LOS</th>
            <th>GivenName</th>
            <th>SureName</th>
            <th>Create Time/Last Modify Time</th>
            <th>Status</th>
            <th>ModifyTimes</th>
            <th>Cancel Time</th>
        </tr>
        </thead>
        <tbody>
        <s:iterator value="paginater.objects">
            <tr
                    <s:if test="reservationItem!=null && reservationItem.cancelDateTime!=null">style="color: #ff0000;</s:if>">
                <td><a href="view.dhtml?condition.ersp=${reservation.ersp}">${reservation.ersp}</a></td>
                <td>${reservation.hotelPassport}</td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.confirmNumber}</s:else></td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.ratePlanCode}</s:else></td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.roomTypeCode}</s:else></td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.adults}</s:else></td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.children}</s:else></td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.numberOfUnit}</s:else></td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.start}</s:else></td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.duration}</s:else></td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.givenName}</s:else></td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>${reservationItem.surename}</s:else></td>
                <td><s:date name="reservation.createTime" format="yyyy-MM-dd HH:mm:ss"/> / <s:date
                        name="reservation.lastUpdateTime"
                        format="yyyy-MM-dd HH:mm:ss"/></td>
                <td>${reservation.status}</td>
                <td>${reservation.modifyTimes}</td>
                <td><s:if test="reservationItem==null">-</s:if><s:else>
                    <s:date name="reservationItem.cancelTime" format="yyyy-MM-dd HH:mm:ss"/></s:else>
                </td>
            </tr>
        </s:iterator>
        </tbody>
    </table>
    <jsp:include page="../../common/pagination.jsp"/>
</div>

